home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 2
/
Amoszine 2.adf
/
MORE_SOURCE_CODE
/
AJC-INSERT-DISK-2.AMOS
/
AJC-INSERT-DISK-2.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-26
|
2KB
|
117 lines
'
' "PLEASE INSERT DISK 2"
' And rather nice it is too.
'
' Enjoy this routine, it's free
' By AJC Ninety Three.
'
' (cue large yawns)
'
ID2
Edit
Procedure ID2
Default Palette 0,$FFF
Hide On
'
Screen Open 3,320,9,2,Lowres
Screen Display 3,,240,,
Curs Off : Flash Off : Hide On
Pen 1 : Paper 0 : Colour 1,$FFF
Centre "PLEASE INSERT DISK 2"
Screen Open 1,320,200,2,Lowres
Screen Open 0,320,40,2,Lowres
Curs Off : Flash Off : Cls 0
Screen 1
Paper 0 : Pen 1
Double Buffer
Autoback 0
Screen Swap
Screen To Front 3
NPS=19
Curs Off : Paper 0 : Cls
Dim X#(NPS),Y#(NPS),Z#(NPS)
XIDGIN#=200 : YRIGIN#=100
ZEDSCALE#=0.003
XPOSITION#=-70 : YPOSITION#=0 : ZPOSITION#=150
For I=1 To NPS
Read X#(I),Y#(I),Z#(I)
Next I
Data -7,7,0,7,7,0,7,-7,0,-7,-7,0,-7,7,0
Data -6,7,0,-6,0,0,6,0,0,6,7,0,7,7,0
Data 7,-7,0,4,-7,0,4,-2,0,-4,-2,0,-4,-7,0
Data 0,-7,0,0,-4,0,-2,-4,0,-2,-7,0
Gosub DDRAWBODY
DDEGREE#=5.25
RRADIAN#=DDEGREE#*2*Pi#/360
HELLISH=0
Do
If Mouse Key : Pop Proc : End If
Inc HELLISH
Gosub SPIN
If ZPOSITION#>60 Then ZPOSITION#=ZPOSITION#-2
XPOSITION#=28
YPOSITION#=20
Cls
Gosub DDRAWBODY
Loop
'
'
Cls
Gosub DDRAWBODY
SPIN:
K$=Inkey$
For I=1 To NPS
K$=Upper$(K$)
If ZPOSITION#>60 Then ZPOSITION#=ZPOSITION#-1
If ZPOSITION#<160 Then ZPOSITION#=ZPOSITION#+1
If HELLISH>40
Gosub TURN
Gosub TURN2
End If
Clear Key
Next I
Return
'
TURN:
C#=X#(I)*Cos(RRADIAN#)-Y#(I)*Sin(RRADIAN#)
Y#(I)=X#(I)*Sin(RRADIAN#)+Y#(I)*Cos(RRADIAN#)
X#(I)=C#
Return
'
TURN2:
C#=Y#(I)*Cos(RRADIAN#)-Z#(I)*Sin(RRADIAN#)
Z#(I)=Y#(I)*Sin(RRADIAN#)+Z#(I)*Cos(RRADIAN#)
Y#(I)=C#
Return
'
DDRAWBODY:
XABSOLX#=X#(1)+XPOSITION# : YABSOLX#=Y#(1)+YPOSITION# : ZABSOLX#=Z#(1)+ZPOSITION#
Gosub PERSPECTIVE
XOLD#=XSCR# : YOLD#=YSCR#
For I=2 To NPS
XABSOLX#=X#(I)+XPOSITION# : YABSOLX#=Y#(I)+YPOSITION# : ZABSOLX#=Z#(I)+ZPOSITION#
Gosub PERSPECTIVE
Draw XOLD#,YOLD# To XSCR#,YSCR#
XOLD#=XSCR# : YOLD#=YSCR#
Next I
Screen Swap
Wait Vbl
Return
'
PERSPECTIVE:
XSCR#=XABSOLX#/(ZABSOLX#*ZEDSCALE#)
YSCR#=YABSOLX#/(ZABSOLX#*ZEDSCALE#)
XSCR#=XSCR#
YSCR#=YSCR#
Return
End Proc